<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class BackRolePermission extends Model
{
    use HasFactory;

    protected $table = 'zfm_rolePermission';

    //  RolePermission 模型中定义与 Role 模型、Permission 模型的多对多关系

    public function role()
    {
        return $this->belongsTo(BackRole::class);
    }

    public function permission()
    {
        return $this->belongsTo(BackPermission::class);
    }

}
